CXX = g++
CXXFLAGS = -W -g \
		   -std=c++0x \
		   -lGL \
		   -lglut \
		   -lGLU \
		   -DDEBUG
ODIR = obj
_OBJ = 	main.o \
		View.o \
		Data.o \
		Point2DData.o \
		CurveView.o \
		CurveData.o \
		Point2D.o \
		Command.o \
		CommandStack.o \
		OGLGraphics.o \
		Color.o \
		Controller.o \
		ViewDataPair.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
VPATH = src/View src/Data src/Common src/Command src/Graphics src/Controller
IDIR = ./include
INCPATH = -I. -I$(IDIR)
PROGRAM = graphical-editor

$(ODIR)/%.o: %.cpp
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

$(PROGRAM): $(OBJ)
	$(CXX) $(CXXFLAGS) $(INCPATH) -o $(PROGRAM) $(OBJ)

clean:
	rm -rf $(PROGRAM) $(ODIR)/*

